<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arr = ['pink', 'red', 'blue']
        let [s1, ...s2] = arr
        // console.log(s1); //pink
        console.log(s2);//会返回一个新数组 包含剩余所有数据['red','blue']
        // console.log(arr);
    </script>
</body>

</html>